/* eslint-disable no-unused-vars */
/* eslint-disable no-console */
/* eslint-disable max-len */
/* eslint-disable camelcase */
import {HTML} from 'oneutil'
import weixin_behavior from '../../behavior/weixin_behavior'
import onekit_behavior from '../../behavior/onekit_behavior'
import wxs_behavior from '../../behavior/wxs_behavior'

const {html2nodes} = HTML

Component({
  mixins: [weixin_behavior, onekit_behavior, wxs_behavior],
  data: {
    nodes: ''
  },
  props: {
    nodes: [],
    space: ''
  },
  didMount() {
    if (typeof this.props.nodes === 'string') {
      this.data.nodes = html2nodes.html2nodes(this.props.nodes)
    } else {
      this.data.nodes = this.props.nodes
    }
  }
})
